package com.atguigu.gmall.cart.client;

import com.atguigu.gmall.model.cart.CartInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@FeignClient(name = "service-cart")
public interface CartFeignClient {

    //加入购物车
    @GetMapping("/api/cart/addToCart/{skuId}/{skuNum}")
    public void addToCart(@PathVariable Long skuId, @PathVariable Integer skuNum);
    //去显示购物成功页面
    @GetMapping("/api/cart/findCartInfoBySkuId/{skuId}")
    public CartInfo findCartInfoBySkuId(@PathVariable  Long skuId);

    //商品清单 只查询选中的
    @GetMapping("/api/cart/findCartListByChecked")
    public List<CartInfo> findCartListByChecked();
}
